Concordia is a menu definition procedure (MDEF) written in MPW C 3.2 that replaces the standard text MDEF (MDEF 0). It does everything that the standard MDEF does except color and displaying small icon resources (sicns). It will display the shrunken icons that MultiFinder uses. The main differences between my MDEF and the standard MDEF is that I have proportional menu scrolling, scrolling arrows that appear quite differently from the standard ones, more consistent spacing between menu items and the edges of the menu, and my arrow icons are stored as resources rather than being hard-coded into the MDEF.
Proportional scrolling means that the farther you drag the mouse into the scroll arrow of the menu, the faster the menu scrolls. If you have the mouse only one pixel into the scroll arrow, the menu will only scroll one pixel at a time.
You’ll have to paste the sicn resources for the arrow icons into the System file for my MDEF to find them.
You can use this as a basis for your own replacement to the standard MDEF in case you need just a bit more functionality than the standard MDEF provides. Concordia and its source code are yours to do with as you please. Enjoy!
Warning! I’m the only one who has tested Concordia, so make sure you do your full set of testing before releasing a product that uses Concordia.
Changes and notes for 1.0.1
Fixed the same bug that the real MDEF had--items beyond item 31 were always disabled. Now, they’re always enabled.
I’m not going crazy with integer-to-short typecasting. I used to think I was being cool. I was sadly mistaken.
I took out the -w2 option in all the compiles so that it doesn’t complain about the lack of integer-to-short typecasting.
Changes and notes for 1.0.2
*sigh* I thought I fixed the bug involving disabled items beyond item 31, but it was still there. I REALLY fixed it this time.
There was a small bug with hierarchical menus when a child menu appeared above or below a menu scrolling area. If the mouse is moved from the child menu directly into the scroll area, a bit of garbage was left on the screen. This was fixed by using another reserved flag in the MBSaveLoc record.
Changes and notes for 1.0.3 (May 2, 1991)
I originally wrote Concordia on a Macintosh Plus, and so I never had considered multiple screens. Pop-up menus should appear on the screen that contains most of the menu, but Concordia always displayed pop-up menus on the main screen. To fix this, I added a function to PopUpTkl.c called FindScreen which searches the GDevice list for the screen that contains most of the menu’s rectangle before the menu’s rectangle is adjusted. The rectangle of that screen is returned. On machines without Color QuickDraw, screenBits.bounds is used as the screen’s rectangle.